package hello;

/**
 * Created with IntelliJIDEA.
 * Description:
 * User: ASUS
 * Date: 2025/8/31
 * Time: 10:22
 */
// 因为类是 public class School，文件名必须是 School.java
// 这个类包含 main 方法，所以是程序的入口
public class School {
    public static void main(String[] args) {
        // 创建一个 Student 类的对象，名为 stu1
        Student1 stu1 = new Student1();

        // 给 stu1 对象的属性赋值
        stu1.name = "张三";
        stu1.gender = "男";
        stu1.age = 18;
        stu1.score = 95.5;

        // 调用 stu1 对象的方法
        stu1.displayInfo();
        stu1.DoClass();

        System.out.println("--------------------");

        // 创建第二个 Student 对象，名为 stu2
        Student1 stu2 = new Student1();
        stu2.name = "李四";
        stu2.gender = "女";
        stu2.age = 17;
        stu2.score = 89.0;

        stu2.displayInfo();
        stu2.DoHomework();
    }
}
